(function() {
    'use strict';
    angular.module('ydApp')
        .factory('ydFilter', function($location, localStore) {
            return {
                request: function(req) {

                    return req;
                },
                responseError: function(response) {
                    console.log(JSON.stringify(response))
                    return response;
                }
            };
        })
        .factory('cardCodeFilter', function(){
            return function(input){
                if(input)
                {
                    var code="**** **** **** ";
                    code=code+input.substring(input.length-4);
                    return code;
                }
            };
        })
        .factory('cardEndFilter', function(){
            return function(input){
                if(input)
                {
                    var code="尾号";
                    code=code+input.substring(input.length-4);
                    return code;
                }
            };
        })
})();

